<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   januslian的回复  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/profile/21/replies/page/4/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466466862: Accept with keywords: (title(0.0):论坛, topn(0.2):帖子,时间,事件,表达式,用户名,数据库,计算,速度,数据,句子,教程,菜单,函数,对象,目标,问题,增加值,普通,好象,股价,语句,密码,代码,主题,是不是,总计,收藏夹,程辑,会员,主站).-->
 </head>
 <body class="bbp-user-page single singular bbpress paged-4 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    januslian的回复
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-0 type- status-publish hentry" id="post-0">
        <header class="entry-header">
         <h1 class="entry-title">
          januslian
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div id="bbp-user-wrapper">
           <div id="bbp-single-user-details">
            <div id="bbp-user-avatar">
             <span class="vcard">
              <a class="url fn n" href="http://cos.name/cn/profile/21/" rel="me" title="januslian">
               <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=150&amp;d=monsterid&amp;r=g"/>
              </a>
             </span>
            </div>
            <!-- #author-avatar -->
            <div id="bbp-user-navigation">
             <ul>
              <li class="">
               <span class="vcard bbp-user-profile-link">
                <a class="url fn n" href="http://cos.name/cn/profile/21/" rel="me" title="januslian的档案">
                 档案
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-topics-created-link">
                <a href="http://cos.name/cn/profile/21/topics/" title="januslian发起的主题">
                 发起的主题
                </a>
               </span>
              </li>
              <li class="current">
               <span class="bbp-user-replies-created-link">
                <a href="http://cos.name/cn/profile/21/replies/" title="januslian创建的回复">
                 创建的回复
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-favorites-link">
                <a href="http://cos.name/cn/profile/21/favorites/" title="januslian的收藏夹">
                 收藏夹
                </a>
               </span>
              </li>
             </ul>
            </div>
            <!-- #bbp-user-navigation -->
           </div>
           <!-- #bbp-single-user-details -->
           <div id="bbp-user-body">
            <div class="bbp-user-replies-created" id="bbp-user-replies-created">
             <h2 class="entry-title">
              回复的主题
             </h2>
             <div class="bbp-user-section">
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 46 到 60（总计 84 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/21/replies/page/3/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/3/">
                 3
                </a>
                <span class="page-numbers current">
                 4
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/5/">
                 5
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/6/">
                 6
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/21/replies/page/5/">
                 →
                </a>
               </div>
              </div>
              <ul class="forums bbp-replies" id="topic-0-replies">
               <li class="bbp-header">
                <div class="bbp-reply-author">
                 作者
                </div>
                <!-- .bbp-reply-author -->
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-header -->
               <li class="bbp-body">
                <div class="bbp-reply-header" id="post-251467">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年6月22日 上午3:42
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/11207/">
                    如何connect R to database然后计算?
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/11207/#post-251467">
                   7 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-251467 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-11207 bbp-reply-position-7 user-id-21 post-251467 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    [b]引用第4楼[i]abel[/i]于[i]2008-06-17 12:32[/i]发表的“”[/b]:
                    <br/>
                    这一行：ret1 &lt;- rbind(ret1, tmp)会让你的代码加速变慢
                   </p>
                  </blockquote>
                  <p>
                   其实，后来我发现还不止这个问题。我的数据库是我自己建立的，本来没什么经验，后来才发现，如果在数据库中合理的使用索引，可以大大降低取数据的时间。比如
                  </p>
                  <pre class="highlight ">library(RODBC)
channle &lt;- odbcConnect("PostgreSQL30")
sqlQuery(channel, "drop index priceindex") ## 删除索引
t1 &lt;- Sys.time()
query1 &lt;- paste("select price.code, price.date,",
                "(price.close/price.closel-1) as ret, rm",
                "from price where price.code=",fore[1,1],
                "and price.date&lt;'", fore[1,2],"' order by date desc limit 150 offset 20",sep = " ")
tmp1 &lt;- sqlQuery(channel, query1)
t2 &lt;- Sys.time()
t2 - t1
##Time difference of 12.938 secs

##select语句中需要对code、date字段进行比较运算及排序，故根据code、date建立组合索引
t1 &lt;- Sys.time()
sqlQuery(channel, "create index priceindex on price (code,date)")
sqlQuery(channel, "cluster priceindex on price")
t2 &lt;- Sys.time()
t2 - t1 ##Time difference of 2.287133 mins


t1 &lt;- Sys.time()
query1 &lt;- paste("select price.code, price.date,",
                "(price.close/price.closel-1) as ret, rm",
                "from price where price.code=",fore[1,1],
                "and price.date&lt;'", fore[1,2],"' order by date desc limit 150 offset 20",sep = " ")
tmp1 &lt;- sqlQuery(channel, query1)
t2 &lt;- Sys.time()
t2 - t1 ##Time difference of 1.101 secs

odbcClose(channel)
</pre>
                  <p>
                   我总共要执行5551次查询，如果以每次12.938 secs计算的话，应该需要17个小时。而使用索引的请况下每次查询的时间只需要1 secs，缩短了不少，而建立索引的时间不过2分半钟（我的数据大概有300万条记录吧）。
                   <br/>
                   所以，在R中连接DBMS的时候，不仅要针对R code进行优化，而且要根据情况优化SQL查询语句，这样运行时间才能缩短。
                  </p>
                  <p>
                   PS：是不是在win下长时间使用R会导致程序运行速度下降啊，今早起来刚开机的时候，运行一次查询只需要0.4秒，而现在却需要1.101 secs？
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-251050">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年6月13日 上午8:24
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/11207/">
                    如何connect R to database然后计算?
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/11207/#post-251050">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-251050 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-11207 bbp-reply-position-2 user-id-21 post-251050 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   不知道DBI能不能直接用，好像有针对专门数据库的具体实现，像RMySQL和RPgSQL。还有一个包是RODBC，
                   <br/>
                   记得Abel好像还专门写过一个教程，关于如何使用RODBC连接DBMS,并从中获取数据
                   <br/>
                   <a class="d4pbbc-url" href="http://www.magnsoftbi.com/forum/uploads/48/2006-10-31_101135_ROEBC2006-10-04_.pdf" rel="nofollow" target="_blank">
                    http://www.magnsoftbi.com/forum/uploads/48/2006-10-31_101135_ROEBC2006-10-04_.pdf
                   </a>
                  </p>
                  <p>
                   我个人觉得用数据库并不能提高算法的效率，连接DBMS的好处在于当数据很大时，可以利用SQL对数据进行预处理，似乎R会把从数据库取出的数据储存在一个data.frame中，以后的分析是基于这样一个data frame进行的。我是这么理解的，不知道是不是有道理。
                  </p>
                  <p>
                   说到效率，我倒有个现成的问题，我经常要对上市公司股价进行分析，常用的像事件研究法，
                   <br/>
                   就需要对发生同一类事件，比如兼并收购，的公司股价进行分析，计算异常收益，判断市场对事件做出什么反应。
                   <br/>
                   因为经常用到股价，所以我就使用PostgreSQL，把所有上市公司的股价统一导入一个表中，然后根据发生某一
                   <br/>
                   事件的公司代码和时间选择一定期间的股价数据，比如：
                  </p>
                  <pre class="highlight ">library(RODBC)
channel &lt;- odbcConnect("PostgreSQL30")
odbcGetInfo(channel)
      DBMS_Name         DBMS_Ver  Driver_ODBC_Ver Data_Source_Name 
    "PostgreSQL"          "8.3.1"          "03.00"   "PostgreSQL30" 
     Driver_Name       Driver_Ver         ODBC_Ver      Server_Name 
  "PSQLODBC.DLL"     "08.02.0500"     "03.52.0000"      "localhost" 
nrow(event)
    [1] 633
event[1:10,] ##数据的构成如下
   code   foredate
1     1 2008-01-18
2     2 2007-10-30
3     5 2007-10-29
4     7 2007-12-08
5     8 2008-01-03
6     9 2008-01-30
7    10 2007-10-31
8    11 2007-10-31
9    14 2008-01-29
10   16 2008-01-31
t1 &lt;- Sys.time()
ret1 &lt;- data.frame()
for(i in 1:nrow(event)) {
 ##取出price表中与event代码相同，foredate前171个交易日至foredate当天的收盘价数据
  query &lt;- paste("select code, date, close from price where code = ",
            event[i,1], " and date &lt;= '", event[i,2], "' order by date ",
              "desc limit 171", sep = "")
  tmp &lt;- sqlQuery(channel,query)
  ret1 &lt;- rbind(ret1, tmp)
}
</pre>
                  <p>
                   但是其速度奇慢无比，我从13：30看是运行这段程序，到现在还没得到结果呢，各位帮忙分析分析是什么原因？
                   <br/>
                   如果我把event直接作为一个表写入数据库，然后只通过SQL再取数据的时候，速度要快的多，不知道这是为什么？
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-250363">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年5月30日 上午11:15
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/11054/">
                    列数不等的两个data.frame合并的问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/11054/#post-250363">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-250363 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-11054 bbp-reply-position-4 user-id-21 topic-author post-250363 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   哇，太好了
                   <br/>
                   非常感谢！
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-245551">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年3月21日 上午5:05
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/10086/">
                    R有金融包吗?
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/10086/#post-245551">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-245551 -->
                <div class="even bbp-parent-forum-1015 bbp-parent-topic-10086 bbp-reply-position-3 user-id-21 post-245551 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   当然有
                   <br/>
                   <a class="d4pbbc-url" href="http://www.rmetrics.org/" rel="nofollow" target="_blank">
                    http://www.rmetrics.org/
                   </a>
                  </p>
                  <p>
                   <a class="d4pbbc-url" href="http://cran.r-project.org/web/views/Finance.html" rel="nofollow" target="_blank">
                    http://cran.r-project.org/web/views/Finance.html
                   </a>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-244397">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年3月9日 上午11:20
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/2243/">
                    （R教程系列）Econometrics in R
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/2243/page/2/#post-244397">
                   18 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-244397 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-2243 bbp-reply-position-18 user-id-21 post-244397 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   <a class="d4pbbc-url" href="http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf" rel="nofollow" target="_blank">
                    http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf
                   </a>
                  </p>
                  <p>
                   到CRAN上下就行
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-242505">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年1月26日 上午4:14
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/9538/">
                    rgui 中console和script 窗口来回切换有什么快捷键吗？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/9538/#post-242505">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-242505 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-9538 bbp-reply-position-2 user-id-21 post-242505 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   看一下，帮助菜单-控制台，上边有热键的说明，窗口切换使用的是ctrl+tab
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-241946">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年1月17日 上午5:23
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/9446/">
                    怎么删除data中的缺失数据
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/9446/#post-241946">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-241946 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-9446 bbp-reply-position-4 user-id-21 post-241946 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    [b]引用第2楼[i]陈放[/i]于[i]2008-01-17 13:21[/i]发表的“”[/b]:
                    <br/>
                    可发现很难他们的方法我很难理解。
                   </p>
                  </blockquote>
                  <p>
                   此话作何解？
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-241115">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2008年1月6日 上午3:11
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/9289/">
                    如何算不同类别的mean 和 length?
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/9289/#post-241115">
                   7 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-241115 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-9289 bbp-reply-position-7 user-id-21 post-241115 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   na.omit(DF)这一步骤是创建了一个新的对象，却不会改变DF的值。
                   <br/>
                   可以这样：
                  </p>
                  <pre class="highlight ">DF1 &lt;- na.omit(DF)
tapply(DF1$z, DF1$x, length)
</pre>
                  <p>
                   结果是：
                   <br/>
                   A B C
                   <br/>
                   2 2 1
                   <br/>
                   最好再看看R-intro里边有相关的介绍。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-238377">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年11月24日 上午1:16
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8727/">
                    大家帮我看看这个R程序…
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8727/#post-238377">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-238377 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-8727 bbp-reply-position-6 user-id-21 post-238377 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   那个i没有用到阿
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-237519">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年11月11日 上午7:01
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8537/">
                    R做图能用极坐标系吗
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8537/#post-237519">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-237519 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-8537 bbp-reply-position-3 user-id-21 post-237519 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   还真能，再plotrix包里有相应的函数
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-236846">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年10月30日 上午3:10
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8389/">
                    求助：使用RODBC读取Excel文件
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8389/#post-236846">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-236846 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-8389 bbp-reply-position-6 user-id-21 topic-author post-236846 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    [b]引用第3楼[i]wintarcy[/i]于[i]2007-10-30 08:16[/i]发表的“”[/b]:
                   </p>
                   <p>
                    select 句子中 "limit" 关键字 没见过啊 刚才搜了一下 才发现是MySQL下的句子
                    <br/>
                    在SQLserver 联机丛书里找不到 limit
                   </p>
                  </blockquote>
                  <p>
                   搜了半天找到个替代的办法
                  </p>
                  <pre class="highlight ">query &lt;- "select code,date,price from (select top 151 * from [price3$] 
                          where code = 2 and date &lt; #2006-6-23#
                          order by date desc) as table1 order by date asc"
sqlQuery(channel, query)
</pre>
                  <p>
                   这样使用top和子查询实现limit的功能。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-236814">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年10月29日 下午12:09
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8389/">
                    求助：使用RODBC读取Excel文件
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8389/#post-236814">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-236814 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-8389 bbp-reply-position-3 user-id-21 topic-author post-236814 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    [b]引用第1楼[i]wintarcy[/i]于[i]2007-10-29 16:01[/i]发表的“”[/b]:
                   </p>
                   <p>
                    是不是excel中不支持sql查询?
                   </p>
                  </blockquote>
                  <p>
                   这道提醒了我。其实， 可以用sql查询Excel。
                   <br/>
                   因为用sqlFetch可以获得数据，而sqlFetch调用sqlQuery函数。我查了一下sqlFetch源码，发现应该这样写才对。
                  </p>
                  <pre class="highlight ">sqlQuery(channel, "select * from [price3$] where code = 2")</pre>
                  <p>
                   这样可以获得代码为2的数据，但是，如果我这样写
                  </p>
                  <pre class="highlight ">sqlQuery(channel, "select * from [price3$] where code = 2 and date = '2006-6-23'")</pre>
                  <p>
                   得到以下错误信息：
                   <br/>
                   [1] "[RODBC] ERROR: Could not SQLExecDirect"
                   <br/>
                   [2] "22018?*\xf4\xff\xff\003 -3030 [Microsoft][ODBC Excel Driver] 标准表达式中数据类型不匹配。"
                   <br/>
                   这个也知道了，应该是，Excel是以数字的形式存储时间，这样，2006-6-23对应的数字为38891，
                  </p>
                  <pre class="highlight ">sqlQuery(channel, "select * from [price3$] where code = 2 and date = 38891")</pre>
                  <p>
                   这样可以正确显示，可是我奇怪的是，为什么我加上limit 150后，还是出错呢？
                  </p>
                  <pre class="highlight ">sqlQuery(channel, "select * from [price3$] where code = 2 and date = 38891 limit 150")</pre>
                  <p>
                   [1] "[RODBC] ERROR: Could not SQLExecDirect"
                   <br/>
                   [2] "42000?潴\xff\xff\003 -3100 [Microsoft][ODBC Excel Driver] 语法错误 (操作符丢失) 在查询表达式 'code = 2 and date &lt; 38891 limit 150' 中。"
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-236525">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年10月24日 下午1:57
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8351/">
                    小问题：有人在R-2.6.0下安装过RDCOMServer吗？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8351/#post-236525">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-236525 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-8351 bbp-reply-position-3 user-id-21 topic-author post-236525 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre class="highlight ">library(RDCOMServer)</pre>
                  <p>
                   载入需要的程辑包：SWinRegistry
                   <br/>
                   Creating a new generic function for "append" in "SWinRegistry"
                   <br/>
                   载入需要的程辑包：Ruuid
                   <br/>
                   Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) :
                   <br/>
                   用于出口的'RDCOMServer'方法有设定，但没有定義：QueryInterface, createCOMObject
                   <br/>
                   此外: Warning messages:
                   <br/>
                   1: '.__M__createCOMObject:RDCOMServer'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   2: '.__M__getValueOf:RDCOMServer'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   3: '.__M__QueryInterface:RDCOMServer'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   4: '.__M__setValueOf:RDCOMServer'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   5: 'createCOMObject'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   6: 'getValueOf'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   7: 'QueryInterface'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   8: 'setValueOf'看起来好象是2.4.0前的S4目标对象；请重新创造
                   <br/>
                   错误: 'RDCOMServer'程辑包/名字空间载入失败，
                  </p>
                  <p>
                   直接用Omegahat上的Binary版本就称这种情况了
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-234982">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年9月29日 上午1:57
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/8063/">
                    企业的生产总值与增加值如何计算？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/8063/#post-234982">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-234982 -->
                <div class="even bbp-parent-forum-990 bbp-parent-topic-8063 bbp-reply-position-3 user-id-21 post-234982 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   怎么定义增加值？
                   <br/>
                   EVA ?
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-234804">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2007年9月26日 上午11:12
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/7862/">
                    用 Word 写的科技文，太丑了——哭！
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/7862/#post-234804">
                   11 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-234804 -->
                <div class="odd bbp-parent-forum-996 bbp-parent-topic-7862 bbp-reply-position-11 user-id-21 post-234804 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   <img src="http://sdn.geekzu.org/avatar/f4c80de62e7291d5dd9a822c302b2013?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/21/" rel="nofollow" title="查看januslian的档案">
                   januslian
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    [b]引用第8楼[i]rtist[/i]于[i]2007-09-26 12:49[/i]发表的“”[/b]:
                    <br/>
                    怎么可以一边写latex的code就能一边看到文档什么样呢？（
                   </p>
                  </blockquote>
                  <p>
                   似乎有一个Preview宏包就是做这个的
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
               </li>
               <!-- .bbp-body -->
               <li class="bbp-footer">
                <div class="bbp-reply-author">
                 作者
                </div>
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-footer -->
              </ul>
              <!-- #topic-0-replies -->
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 46 到 60（总计 84 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/21/replies/page/3/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/3/">
                 3
                </a>
                <span class="page-numbers current">
                 4
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/5/">
                 5
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/21/replies/page/6/">
                 6
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/21/replies/page/5/">
                 →
                </a>
               </div>
              </div>
             </div>
            </div>
            <!-- #bbp-user-replies-created -->
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>